package com.mdx.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

/**
 * 日志
 */
@TableName("t_log")
public class LogBean {
    @TableId(value = "pk_logId",type = IdType.AUTO)
    private int logId;

    /**
     * 日志内容
     */
    @TableField("f_logContent")
    private String logContent;

    /**
     * 登陆日期
     */
    @TableField("f_loginTime")
    private LocalDate loginTime = LocalDate.now();


    private UserBean userBean;

    public int getLogId() {
        return logId;
    }

    public void setLogId(int logId) {
        this.logId = logId;
    }

    public String getLogContent() {
        return logContent;
    }

    public void setLogContent(String logContent) {
        this.logContent = logContent;
    }

    public LocalDate getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(LocalDate loginTime) {
        this.loginTime = loginTime;
    }

    public UserBean getUserBean() {
        return userBean;
    }

    public void setUserBean(UserBean userBean) {
        this.userBean = userBean;
    }

    @Override
    public String toString() {
        return "LogBean{" +
                "logId=" + logId +
                ", logContent='" + logContent + '\'' +
                ", loginTime=" + loginTime +
                ", userBean=" + userBean +
                '}';
    }

    public LogBean() {
    }

    public LogBean(String logContent, LocalDate loginTime, UserBean userBean) {
        this.logContent = logContent;
        this.loginTime = loginTime;
        this.userBean = userBean;
    }
}
